<?xml version="1.0" encoding="UTF-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

	<h1>Ratios</h1>
	<h3>Indicadores Financieros</h3>	
	<p:panelGrid>	
			<f:facet name="header">			
				<p:row>
					<p:column></p:column>
					<c:forEach var="detalleList" items="#{ratioMB.detalleListRIF}">
						<p:column styleClass="negritaFondoAzul"><h:outputText value="#{detalleList.periodo}"/></p:column>
					</c:forEach>
					<p:column styleClass="negritaFondoAzul">Ideal</p:column>
				</p:row>	
			</f:facet>	
			<c:set var="i" value="0"></c:set>
			<c:set var="COD200" value="#{msg.COD200}"></c:set>
			<c:set var="COD201" value="#{msg.COD201}"></c:set>
			<c:set var="COD202" value="#{msg.COD202}"></c:set>
			<c:set var="COD203" value="#{msg.COD203}"></c:set>
			<c:forEach var="indicadores" items="#{ratioMB.indicadorListRIF}">
				<p:row>
					<p:column styleClass="negritaFondoAzul"><h:outputText value="#{indicadores.descripcion}"/></p:column>
					<c:forEach var="detalleList" items="#{ratioMB.detalleListRIF}">
						<p:column>
							<h:outputText value="#{detalleList.indicadores[i].valor}">
								<f:convertNumber minFractionDigits="2" />
							</h:outputText>
						</p:column>
					</c:forEach>
					<c:set var="cod" value="#{indicadores.codigo}"></c:set>
					<c:if test="#{(cod == COD200)}">
						<p:column><img src="../resources/images/arrow_full_down.png" /></p:column>					
					</c:if>	
					<c:if test="#{(cod == COD201) or (cod == COD202) or (cod == COD203)}">
						<p:column><img src="../resources/images/arrow_full_up.png" /></p:column>
					</c:if>																		
				</p:row> 
			<c:set var="i" value="#{i+1}"/>		   
			</c:forEach>
	</p:panelGrid>	
	<h3>Indicadores Economicos</h3>	
	<p:panelGrid>	
			<f:facet name="header">
				<p:row>
					<p:column></p:column>
					<c:forEach var="detalleList" items="#{ratioMB.detalleListRIE}">
						<p:column styleClass="negritaFondoAzul"><h:outputText value="#{detalleList.periodo}"/></p:column>
					</c:forEach>
					<p:column styleClass="negritaFondoAzul">Ideal</p:column>
				</p:row>	
			</f:facet>	
			<c:set var="i" value="0"></c:set>
			<c:set var="COD204" value="#{msg.COD204}"></c:set>
			<c:set var="COD205" value="#{msg.COD205}"></c:set>
			<c:set var="COD206" value="#{msg.COD206}"></c:set>
			<c:set var="COD207" value="#{msg.COD207}"></c:set>
			<c:set var="COD208" value="#{msg.COD208}"></c:set>
			<c:set var="COD209" value="#{msg.COD209}"></c:set>
			<c:forEach var="indicadores" items="#{ratioMB.indicadorListRIE}">
				<p:row>
					<p:column styleClass="negritaFondoAzul"><h:outputText value="#{indicadores.descripcion}"/></p:column>
					<c:forEach var="detalleList" items="#{ratioMB.detalleListRIE}">
						<p:column>
							<h:outputText value="#{detalleList.indicadores[i].valor}">
								<f:convertNumber minFractionDigits="2" />
							</h:outputText>
						</p:column>
					</c:forEach>
					<c:set var="cod" value="#{indicadores.codigo}"></c:set>
					<c:if test="#{(cod == COD204) or (cod == COD205)}">
						<p:column><img src="../resources/images/arrow_full_down.png" /></p:column>					
					</c:if>	
					<c:if test="#{(cod == COD206) or (cod == COD207) or (cod == COD208) or (cod == COD209)}">
						<p:column><img src="../resources/images/arrow_full_up.png" /></p:column>					
					</c:if>																				
				</p:row> 
			<c:set var="i" value="#{i+1}"/>
			</c:forEach>
	</p:panelGrid>
		
</html>